# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=easy-rsa
pkgver=3.0.7
pkgrel=0
pkgdesc="Simple shell based CA utility"
url="https://github.com/OpenVPN/easy-rsa"
arch="noarch"
license="GPL-2.0-only"
depends="openssl"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/OpenVPN/easy-rsa/archive/v$pkgver.tar.gz"

package() {
	mkdir -p "$pkgdir"/usr/share/easy-rsa \
		"$pkgdir"/usr/share/doc/easy-rsa
	cp -rp easyrsa3/* "$pkgdir"/usr/share/easy-rsa/ \
		&& cp -rp doc/* "$pkgdir"/usr/share/doc/easy-rsa/
}

check() {
	./easyrsa3/easyrsa help
}

sha512sums="4e7dadafd9e3f8381029cf4a20f0a6fe58c6bee0571e0f8ff9711e1dae386bbfd81b5d8bbec58f415e367d613b90465a4635e8f924668ad73de555fe8bb8c82c  easy-rsa-3.0.7.tar.gz"
